package com.test.consumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.test.consumer.feign.TestDemoService;
import com.test.consumer.feign.TestService;
import com.test.consumer.model.RestData;

@Controller
@RequestMapping("consumer")
public class DemoConsumerController {
    
    @Autowired
    private TestService testService;
    
    @Autowired
    private TestDemoService testDemoService;
    
    @RequestMapping("test")
    @ResponseBody
    public RestData test() {
        testService.test();
        return RestData.makeSuccess(testDemoService.test());
    }
    
}
